import UserLayout from '@/components/Layouts';
// import UserLayout2 from '@/components/Layouts2';
// import { UserLayouts } from '@/layouts';
import LoginLayout from '@/layouts/LoginLayout';

/**
 * 基础路由de
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/',
    redirect: { path: '/home' }
  },

  {
    path: '/home',
    component: UserLayout,
    redirect: { path: '/home/normal' },
    children: [
      {
        path: 'index',
        meta: {
          title: '首页'
        },
        component: () => import('@/views/home/Index.vue'),
        children: [
          {
            path: '/home/normal',
            meta: {
              title: '日常面板',
              type: 'home'
            },
            component: () => import('@/views/home/Normal.vue')
          },
          {
            path: '/home/danger',
            meta: {
              title: '应急面板',
              type: 'home'
            },
            component: () => import('@/views/home/Danger.vue')
          }
        ]
      }
    ]
  },

  {
    path: '/dataview/index',
    meta: {
      title: '数据统计'
    },
    component: () => import('@/views/dataview/Index.vue')
  },

  {

    path: '/cockpit/index',
    redirect: '/cockpit/home',
    meta: {
      title: '驾驶舱'
    },
    component: () => import('@/views/cockpit/IndexView.vue'),
    children: [
      {
        path: '/cockpit/index2',
        component: () => import('@/views/cockpit/Index.vue'),
        children: [
          {
            path: '/cockpit/home',
            meta: {
              title: '驾驶舱'
            },
            component: () => import('@/views/cockpit/Home.vue')
          },
          {
            path: '/cockpit/account',
            meta: {
              title: '重点账号'
            },
            component: () => import('@/views/cockpit/Account.vue')
          },
          {
            path: '/cockpit/event',
            meta: {
              title: '驾驶舱事件'
            },
            component: () => import('@/views/cockpit/Event.vue')
          },
          {
            path: '/cockpit/hot',
            meta: {
              title: '驾驶舱热搜'
            },
            component: () => import('@/views/cockpit/Hot.vue')
          },
          {
            path: '/cockpit/judge',
            meta: {
              title: '驾驶舱研判记录'
            },
            component: () => import('@/views/cockpit/Judge.vue')
          },
          {
            path: '/cockpit/report',
            meta: {
              title: '驾驶舱第三方报告'
            },
            component: () => import('@/views/cockpit/Report.vue')
          }
        ]
      }
    ]

  },

  {
    path: '/cooperation',
    component: UserLayout,
    redirect: { path: '/cooperation/index' },
    children: [
      {
        path: '/cooperation/index',
        meta: {
          title: '区县市网信办'
        },
        component: () => import('@/views/cooperation/Index.vue')
      },
      {
        path: '/cooperation/indexOut',
        meta: {
          title: '市级部门'
        },
        component: () => import('@/views/cooperation/Index.vue')
      }
    ]
  },
    // 应急处置工作专区
  {
    path: '/emergency',
    component: UserLayout,
    redirect: { path: '/emergency/index' },
    children: [
      {
        path: '/emergency/article',
        meta: {
          title: '文章处置监控'
        },
        component: () => import('@/views/emergency/article/Index.vue')
      },
      {
        path: '/emergency/video',
        meta: {
          title: '视频截取'
        },
        component: () => import('@/views/emergency/video/Index.vue')
      },
      {
        path: '/emergency/addressBook',
        meta: {
          title: '处置通讯录'
        },
        component: () => import('@/views/emergency/addressBook/Index.vue')
      },
      {
        path: '/emergency/sendMsg',
        meta: {
          title: '发送短信'
        },
        component: () => import('@/views/emergency/sendMsg/Index.vue')
      }

      // {
      //   path: '/emergency/czsj',
      //   meta: {
      //     title: '批量处理'
      //   },
      //   component: () => import('@/views/emergency/czsj/Index.vue')
      // },
      // {
      //   path: '/emergency/componey',
      //   meta: {
      //     title: '第三方公司'
      //   },
      //   component: () => import('@/views/emergency/componey/Index.vue')
      // }

    ]
  },

  {
    path: '/shareLink',
    component: UserLayout,
    redirect: { path: '/shareLink/index' },
    children: [
      {
        path: '/shareLink/index',
        meta: {
          title: '分享链接管理'
        },
        component: () => import('@/views/shareLink/Index.vue')
      }
    ]
  },

  {
    path: '/safeInter',
    component: UserLayout,
    redirect: { path: '/safeInter/index' },
    children: [
      {
        path: '/safeInter/index',
        meta: {
          title: '网络安全通报'
        },
        component: () => import('@/views/safeInter/Index.vue')
      }
    ]
  },

  // 属地数据库
  {
    path: '/db',
    component: UserLayout,
    redirect: { path: '/db/account' },
    children: [
      {
        path: '/db/account',
        meta: {
          title: '网络账号数据库'
        },
        component: () => import('@/views/db/Account/Index.vue')
      },
      {
        path: '/db/SpecialRectificatio',
        meta: {
          title: '网信专项整治数据库'
        },
        component: () => import('@/views/db/SpecialRectificatio/Index.vue')
      },
      {
        path: '/db/Enforcement',
        meta: {
          title: '网络安全专家库'
        },
        component: () => import('@/views/db/Enforcement/Index.vue')
      },
      {
        path: '/db/lottie',
        meta: {
          title: '抽签'
        },
        component: () => import('@/views/db/Enforcement/lottie.vue')
      },
      {
        path: '/db/Enforcement/history',
        meta: {
          title: '抽签历史记录'
        },
        component: () => import('@/views/db/Enforcement/History.vue')
      },
      {
        path: '/db/EnforcementCases',
        meta: {
          title: '网信执法案例数据库'
        },
        component: () => import('@/views/db/EnforcementCases/Index.vue')
      },
      {
        path: '/db/Popularizing',
        meta: {
          title: '网信普法基地数据库'
        },
        component: () => import('@/views/db/Popularizing/Index.vue')
      },
      {
        path: '/db/StressEnterprises',
        meta: {
          title: '重点网信企业数据库'
        },
        component: () => import('@/views/db/StressEnterprises/Index.vue')
      },
      {
        path: '/db/stressEnterprises/edit',
        meta: {
          title: '重点企业数据库',
          name: '重点企业数据'
        },
        hidden: true,
        name: 'StressEnterprises-edit',
        component: () => import('@/views/db/StressEnterprises/action/createInfo.vue')
      },
      {
        path: '/db/dangindex',
        meta: {
          title: '党建数据库'
        },
        hidden: true,
        name: 'dangindex',
        redirect: '/db/dang',
        component: () => import('@/views/db/Dang/RouterViews.vue'),
        children: [
          {
            path: '/db/dang',
            meta: {
              title: '宁波市互联网企业一级库'
            },
            hidden: true,
            name: 'dang',
            component: () => import('@/views/db/Dang/Index.vue')
          },
          {
            path: '/db/danglevel2',
            meta: {
              title: '宁波市互联网企业二级库'
            },
            hidden: true,
            name: 'danglevel2',
            component: () => import('@/views/db/DangLevel2/Index.vue')
          },
          {
            path: '/db/dangimportant',
            meta: {
              title: '宁波市重点互联网企业'
            },
            hidden: true,
            name: 'dangimportant',
            component: () => import('@/views/db/DangImportant/Index.vue')
          },
          {
            path: '/db/danggroup',
            meta: {
              title: '宁波市互联网企业党组织'
            },
            hidden: true,
            name: 'danggroup',
            component: () => import('@/views/db/DangGroup/Index.vue')
          }
        ]
      }
    ]
  },

  // 重点文章 数据管理
  {
    path: '/article',
    component: UserLayout,
    redirect: { path: '/article/index' },
    children: [
      {
        path: '/article/index',
        meta: {
          title: '重点文章数据管理'
        },
        component: () => import('@/views/article/Index.vue')
      }
    ]
  },

  // 舆情详情
  {
    path: '/yqDetail',
    component: UserLayout,
    redirect: { path: '/yqDetail/index' },
    children: [
      {
        path: '/yqDetail/index',
        meta: {
          title: '文章详情'
        },
        component: () => import('@/views/yqDetail/Index.vue')
      }
    ]
  },

  {
    path: '/dhData',
    component: UserLayout,
    redirect: { path: '/dhData/index' },
    children: [
      {
        path: '/dhData/index',
        meta: {
          title: '数据管理'
        },
        component: () => import('@/views/dhData/Index.vue')
      }
    ]
  },

  {
    path: '/detail',
    component: UserLayout,
    redirect: { path: '/detail/index' },
    children: [
      {
        path: '/detail/index',
        meta: {
          title: '事件详情'
        },
        component: () => import('@/views/detail/Index.vue')
      }
    ]
  },

  {
    path: '/verifyData',
    component: UserLayout,
    redirect: { path: '/verifyData/index' },
    children: [
      {
        path: '/verifyData/index',
        meta: {
          title: '数据审核'
        },
        component: () => import('@/views/verifyData/Index.vue')
      }
    ]
  },

  {
    path: '/hotHistory',
    component: UserLayout,
    redirect: { path: '/hotHistory/index' },
    children: [
      {
        path: '/hotHistory/index',
        meta: {
          title: '宁波热搜榜历史记录'
        },
        component: () => import('@/views/hotHistory/Index.vue')
      }
    ]
  },

  {
    path: '/saveEvent',
    component: UserLayout,
    redirect: { path: '/saveEvent/index' },
    children: [
      {
        path: '/saveEvent/index',
        meta: {
          title: '事件存档'
        },
        component: () => import('@/views/saveEvent/Index.vue')
      }
    ]
  },

  {
    path: '/overEvent',
    component: UserLayout,
    redirect: { path: '/overEvent/index' },
    children: [
      {
        path: '/overEvent/index',
        meta: {
          title: '已结束事件'
        },
        component: () => import('@/views/overEvent/Index.vue')
      }
    ]
  },

  {
    path: '/handleEvent',
    component: UserLayout,
    redirect: { path: '/handleEvent/index' },
    children: [
      {
        path: '/handleEvent/index',
        meta: {
          title: '处置事件',
          type: 'event'
        },
        component: () => import('@/views/handleEvent/Index.vue')
      },
      {
        path: '/handleEvent/watch',
        meta: {
          title: '观察事件',
          type: 'event'
        },
        component: () => import('@/views/handleEvent/Watch.vue')
      }
    ]
  },

  {
    path: '/insTemplate',
    component: UserLayout,
    redirect: { path: '/insTemplate/index' },
    children: [
      {
        path: '/insTemplate/index',
        meta: {
          title: '指令模板'
        },
        component: () => import('@/views/insTemplate/Index.vue')
      }
    ]
  },

  {
    path: '/insPlan',
    component: UserLayout,
    redirect: { path: '/insPlan/index' },
    children: [
      {
        path: '/insPlan/index',
        meta: {
          title: '指令计划'
        },
        component: () => import('@/views/insPlan/Index.vue')
      },
      {
        path: '/insPlan/detail',
        meta: {
          title: ''
        },
        component: () => import('@/views/insPlan/Detail.vue')
      }
    ]
  },

  {
    path: '/semHistory',
    component: UserLayout,
    redirect: { path: '/semHistory/index' },
    children: [
      {
        path: '/semHistory/index',
        meta: {
          title: '网上舆情信息表历史记录'
        },
        component: () => import('@/views/semHistory/Index.vue')
      }
    ]
  },

  {
    path: '/semList',
    component: UserLayout,
    redirect: { path: '/semList/index' },
    children: [
      {
        path: '/semList/index',
        meta: {
          title: ''
        },
        component: () => import('@/views/semList/Index.vue')
      },
      {
        path: '/semList/wsrs',
        meta: {
          title: ''
        },
        component: () => import('@/views/semList/wsrs.vue')
      },
      {
        path: '/semList/wsrs2',
        meta: {
          title: ''
        },
        component: () => import('@/views/semList/wsrs2.vue')
      },
      {
        path: '/semList/index1',
        meta: {
          title: ''
        },
        component: () => import('@/views/semList/Index1.vue')
      },
      {
        path: '/semList/report',
        meta: {
          title: ''
        },
        component: () => import('@/views/semList/report.vue')
      },
      {
        path: '/semList/index2',
        meta: {
          title: ''
        },
        component: () => import('@/views/semList/Index2.vue')
      },
      {
        path: '/semList/index3',
        meta: {
          title: ''
        },
        component: () => import('@/views/semList/Index3.vue')
      }
    ]
  },

  {
    path: '/semNewList',
    component: UserLayout,
    redirect: { path: '/semNewList/index' },
    children: [
      {
        path: '/semNewList/index',
        meta: {
          title: '最新舆情事件'
        },
        component: () => import('@/views/semNewList/Index.vue')
      },
      {
        path: '/club/index',
        meta: {
          title: '事件线索'
        },
        component: () => import('@/views/semNewList/club.vue')
      }
    ]
  },

  {
    path: '/reportOnDuty',
    component: UserLayout,
    redirect: { path: '/reportOnDuty/index' },
    children: [
      {
        path: '/reportOnDuty/index',
        meta: {
          title: '值班报送'
        },
        component: () => import('@/views/reportOnDuty/Index.vue')
      }
    ]
  },

  // {
  //   path: '/video',
  //   component: UserLayout,
  //   redirect: { path: '/video/index' },
  //   children: [
  //     {
  //       path: 'index',
  //       meta: {
  //         title: '视频截取'
  //       },
  //       component: () => import('@/views/video/Index.vue')
  //     }
  //   ]
  // },

  // {
  //   path: '/czsj',
  //   component: UserLayout,
  //   redirect: { path: '/czsj/index' },
  //   children: [
  //     {
  //       path: 'index',
  //       meta: {
  //         title: '批量处理'
  //       },
  //       component: () => import('@/views/czsj/Index.vue')
  //     }
  //   ]
  // },

  {
    path: '/user',
    redirect: '/user/authlogin',
    component: LoginLayout,
    children: [
      {
        path: '/user/login',
        component: () => import('@/views/user/Login.vue')
      },
      {
        path: '/user/authlogin',
        name: 'login',
        component: () => import('@/views/user/AuthLogin.vue')
      },
      {
        path: '/user/loading',
        name: 'loading',
        component: () => import('@/views/user/Loading.vue')
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }
];
